package com.gem.day06.extend1;

import java.time.LocalDate;

/**具有底薪的销售人员*/
//通过extends关键字来实现继承
public class BasedPlusSalesEmployee extends SalsEmployee {
	//共性属性无需写,从父类继承
	//特有属性
	private double baseSalary;//底薪

	public BasedPlusSalesEmployee() {

	}

	public BasedPlusSalesEmployee(String name, LocalDate birthday, double total, double rank, double baseSalary) {
		super(name, birthday, total, rank);
		this.baseSalary = baseSalary;
	}

	public double getBaseSalary() {
		return baseSalary;
	}

	public void setBaseSalary(double baseSalary) {
		this.baseSalary = baseSalary;
	}

	@Override
	public double getSalary(int month) {
		return super.getSalary(month) + baseSalary;
	}

	@Override
	public String toString() {
		return super.toString() + ",底薪: " + baseSalary;
	}
}
